function ParseToDate(value) {
	//return  new Date(Date.parse(value.replace(/-/g,"/")));
	if (typeof value != 'string'){
		alert('not string');
		return null;
	}
	var dt=value.match(/^(\d{1.4})(-|\/|[]|[.])(\d{1.2})\2(\d{1,2})$/);
	var newdate=new Date();
	if(dt==null) {
		//alert('');
		return null;
	}
	var y,m,d;
	y=parseInt(dt[1],10);
	m=parseInt(dt[2],10);
	d=parseInt(dt[3],10);
	if(m>12 || m<0)
		return null;
	if(d>0){
		newdate.setFullYear(y);
		newdate.setDate(d);
		newdate.setMonth(m);  
		return newdate
	} else {
		return null;
	} 
}


function getGenderCombo(id) {
	 var _id = 'gender';
	 if (id != null) {
		 _id = id;
	 }
	 return new Ext.form.ComboBox({
		fieldLabel : '性别',
		//hiddenName : _id,
		store : new Ext.data.SimpleStore({
			fields : ['value', 'text'],
			data : [['0','男'],['1','女']]
		}),
		displayField : 'text',
		valueField : 'value',
		mode : 'local',
		triggerAction : 'all',
		selectOnFocus : true,
		anchor : '95%',
		id:_id,
		name:_id
	});	
}
function $(id){
	return document.getElementById(id);
}
function $F(id){
	return $(id).value;
}